#ifndef TOBJECTSTATE_H
#define TOBJECTSTATE_H

class TObjectState
{
    int _value;
    int _previous;
public:
    TObjectState(int value = 0){
        _value = value;
    }

    int value() const{
        return _value;
    }

    TObjectState& setValue(int value){
        _previous = _value;
        _value = value;

        return *this;
    }

    int previous(){
        return _previous;
    }

    TObjectState& operator = (int value){
        return setValue(value);
    }
};

#endif // TOBJECTSTATE_H
